<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
 "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Ajax</title>
<script type="text/javascript">
function odczytaj()
{
  var div1 = document.getElementById("div1");
  styl = div1.getAttribute("style");
  alert(styl);
}
function przypisz()
{
  var div1 = document.getElementById("div1");
  div1.setAttribute("style",
       "background-color:#A0A0A0;width:300px;height:100px;");
}
function usun()
{
  var div1 = document.getElementById("div1");
  div1.removeAttribute("style");
}
</script>
</head>
<body>
<div>
<input type="button" value="Odczytaj styl" onclick="odczytaj();">
<input type="button" value="Przypisz styl" onclick="przypisz();">
<input type="button" value="Usuń styl" onclick="usun();">
</div>
<div id="div1" style="background-color:#D0D0D0;width:300px;height:100px;">
</div>
</body>
</html>
